package lesson01;

import java.awt.*;

public class TestFlowLayout {
    public static void main(String[] args) {
        Frame frame=new  Frame();
        //组件-按钮
        Button botton1=new Button("button1");
        Button botton2=new Button("button2");
        Button botton3=new Button("button3");

        //设置流布局
         frame.setLayout(new FlowLayout(FlowLayout.CENTER));
         frame.setSize(200,200);
         //把按钮添加上去
        frame.add(botton1);
        frame.add(botton2);
        frame.add(botton3);

        frame.setVisible(true);
    }
}
